Skip to content

Conversation

@ShivaGupta-14
Copy link
Contributor

Description

  • Add tests for Keyboard Navigation (ArrowUp, ArrowDown, boundary stops)

  • Add tests for Hotkey Shortcuts ('a', 'c', 'd', 'f', 'p', 'r', 's', 't', Enter)

  • Add tests for complete/delete hotkeys when dialog is already open

  • Add test for hotkeys disabled when input is focused

  • Update MultiSelectFilter mock to use aria-expanded for behavior testing

  • Remove unnecessary mock override in overdue filter test

  • Tracking Issue : Tracking Issue: Tasks Component Test Improvements #433

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Before:

Screenshot 2026-01-22 at 1 33 20 AM

After:

Screenshot 2026-01-22 at 1 34 18 AM

@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!


jest.mock('@/components/ui/multi-select', () => ({
MultiSelectFilter: jest.fn(({ title, completionStats }) => (
<div data-testid={`multi-select-${title.toLowerCase()}`}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded ids are better, for the time being

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@its-me-abhishek, I see this comment is on the pre-existing
data-testid line L48 left, not my new changes.

also, both id={id} and data-testid={title.toLowerCase()}
result in hardcoded values ("projects", "status", "tags")-
they're derived the same way

<MultiSelectFilter
  id="projects"
  title="Projects"
  options={uniqueProjects}
  selectedValues={selectedProjects}
  onSelectionChange={setSelectedProjects}
  className="hidden lg:flex min-w-[140px]"
  icon={<Key label="p" />}
  completionStats={projectStats}
/>

Could you clarify what change you'd like me to make?

- Add tests for Keyboard Navigation (ArrowUp, ArrowDown, boundary stops)
- Add tests for Hotkey Shortcuts ('a', 'c', 'd', 'f', 'p', 'r', 's', 't', Enter)
- Add tests for complete/delete hotkeys when dialog is already open
- Add test for hotkeys disabled when input is focused
- Update MultiSelectFilter mock to use aria-expanded for behavior testing
- Remove unnecessary mock override in overdue filter test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants